package com.example.classassistant;

import javafx.collections.FXCollections;
import javafx.collections.ObservableList;

import java.util.ArrayList;
import java.util.List;

public class Class {
    String className;
    ObservableList<Group> groups;

    public Class(String className) {
        this.className = className;
        this.groups = FXCollections.observableArrayList();
    }

    public void addGroup(Group group) {
        groups.add(group);
    }

    public void removeGroup(Group group) {
        groups.remove(group);
    }

    public ObservableList<Group> getGroups() {
        return groups;
    }

    @Override
    public String toString() {
        return "Class: " + className + '\n' +
                groups;
    }
}